<template>
  <div class="detail-wrapper">
    <div class="container">
      <div class="nav-bar">
        <el-breadcrumb :separator-icon="ArrowRight">
          <el-breadcrumb-item :to="{ path: '/products/list' }"
            >全部商品</el-breadcrumb-item
          >
          <el-breadcrumb-item>商品详情</el-breadcrumb-item>
        </el-breadcrumb>
      </div>
      <div class="detail-flex">
        <div class="imgs-box">
          <div class="cur-img">
            <el-image
              :src="'https://q01.yinge.cc/resource/2024/03/22/128d272f-b699-44d7-8684-79c38c785b64.jpeg?imageMogr2/auto-orient/format/webp/thumbnail/!750x750r/interlace/1/ignore-error/1'"
            ></el-image>
          </div>
          <div class="img-list">
            <div class="img active">
              <el-image
                :src="'https://q01.yinge.cc/resource/2024/03/22/128d272f-b699-44d7-8684-79c38c785b64.jpeg?imageMogr2/auto-orient/format/webp/thumbnail/!750x750r/interlace/1/ignore-error/1'"
              ></el-image>
            </div>
            <div class="img">
              <el-image
                :src="'https://q01.yinge.cc/resource/2024/03/22/16673397-c97c-46ee-90a0-b0847a8acb85.jpeg?imageMogr2/auto-orient/format/webp/thumbnail/!300x300r/interlace/1/ignore-error/1'"
              ></el-image>
            </div>
          </div>
        </div>
        <div class="info-box">
          <div class="info-title">7cm仿柯印透明无底座立牌（厚度1cm）</div>
          <div class="desc">10mm厚度亚克力立牌</div>
          <div class="price-box">
            <div class="flex">
              <div class="label">商品</div>
              <div class="flex" style="gap: 55px">
                <div class="price-item">
                  <div class="price-text">
                    <span class="text-custom-red text-xl">¥</span>
                    <span class="text-custom-red text-2xl">3.50</span>
                  </div>
                  <p class="text-custom-gray text-[12px]">1~9个</p>
                </div>
                <div class="price-item">
                  <div class="price-text">
                    <span class="text-custom-red text-xl">¥</span>
                    <span class="text-custom-red text-2xl">3.30</span>
                  </div>
                  <div class="text-custom-gray text-[12px]">10~19个</div>
                </div>
                <div class="price-item">
                  <div class="price-text">
                    <span class="text-custom-red text-xl">¥</span>
                    <span class="text-custom-red text-2xl">3.30</span>
                  </div>
                  <div class="text-custom-gray text-[12px]">10~19个</div>
                </div>
                <div class="price-item">
                  <div class="price-text">
                    <span class="text-custom-red text-xl">¥</span>
                    <span class="text-custom-red text-2xl">3.30</span>
                  </div>
                  <div class="text-custom-gray text-[12px]">10~19个</div>
                </div>
              </div>
            </div>
            <div class="flex pt-16">
              <div class="label">发货</div>
              <div>
                <div class="flex mb-8">
                  <p class="w-[300px]">
                    <span class="font-medium text-[16px]">¥2.96</span>
                    <span class="text-[14px] text-custom-gray"
                      >起， 含包装+运费</span
                    >
                  </p>
                  <div
                    class="cursor-pointer text-[14px] text-blue-600 leading-[22px]"
                  >
                    价格说明
                  </div>
                </div>
                <div class="flex mb-8">
                  <p class="w-[300px]">
                    <span class="text-[14px] text-custom-gray"
                      >预计下单后7天左右发货</span
                    >
                  </p>
                  <div
                    class="cursor-pointer text-[14px] text-blue-600 leading-[22px]"
                  >
                    时效说明
                  </div>
                </div>
                <div class="flex mb-8">
                  <div class="w-[300px]">
                    <span class="text-[14px] text-custom-gray"> 商品包裹 </span>
                    <span class="text-[14px] text-orange-500"
                      >满¥199可包邮</span
                    >
                  </div>
                  <div
                    class="cursor-pointer text-[14px] text-blue-600 leading-[22px]"
                  >
                    包邮规则
                  </div>
                </div>
              </div>
            </div>
            <div class="p-20 bg-gray-100">
              <div class="flex flex-wrap gap-x-[30px] gap-y-[20px]">
                <div class="w-[174px] text-[14px] font-[400]">
                  <div class="text-[14px] text-custom-gray">尺寸</div>
                  <div class="text-[14px] pt-8">3cm</div>
                </div>
                <div class="w-[174px] text-[14px] font-[400]">
                  <div class="text-[14px] text-custom-gray">材质</div>
                  <div class="text-[14px] pt-8">全新高透亚克力板材</div>
                </div>
                <div class="w-[174px] text-[14px] font-[400]">
                  <div class="text-[14px] text-custom-gray">厚度</div>
                  <div class="text-[14px] pt-8">10mm</div>
                </div>
                <div class="w-[174px] text-[14px] font-[400]">
                  <div class="text-[14px] text-custom-gray">工艺</div>
                  <div class="text-[14px] pt-8">仿柯印UV印刷，支持彩窗</div>
                </div>
              </div>
            </div>
            <div class="mt-24">
              <div class="flex mb-20">
                <div class="label">选择尺寸</div>
                <div>
                  <el-button type="primary">3cm</el-button>
                  <el-button type="primary">4cm</el-button>
                  <el-button type="primary">5cm</el-button>
                  <el-button type="primary">6cm</el-button>
                </div>
              </div>
              <div class="flex">
                <div class="label">选择厚度</div>
                <div>
                  <el-button type="primary">1cm</el-button>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="detail-tab">
        <div class="tab active">商品介绍</div>
        <a class="tab" href="#photo">传图规范</a>
        <a class="tab" href="#package">包装与售后</a>
      </div>
      <div class="detail-image">
        <img
          src="https://q01.yinge.cc/resource/2024/03/22/eb62319d-1495-494e-85ed-99d6081e0439.jpeg"
          alt=""
        />
      </div>
      <div class="detail-image" id="photo">
        <div class="title">传图规范</div>
        <img
          src="https://q01.yinge.cc/resource/2024/03/22/97f47bab-c529-477d-83da-cbc05d2cf540.jpeg"
          alt=""
        />
      </div>
      <div class="detail-image" id="package">
        <div class="title">包装与售后</div>
        <img
          src="https://q01.yinge.cc/resource/2023/11/24/4e850492-d998-4fef-b2bd-8484b540e2d6.jpeg"
          alt=""
        />
        <img
          src="https://q01.yinge.cc/resource/2024/01/30/fae710f0-9260-443d-95fb-039594c69c43.jpeg"
          alt=""
        />
      </div>
    </div>
  </div>
</template>

<script setup>
import { ArrowRight } from '@element-plus/icons-vue'
</script>

<style lang="scss" scoped>
.flex {
  display: flex;
}
.detail-wrapper {
  background-color: #fff;
  .container {
    width: 1180px;
    margin: 0 auto;
    padding-bottom: 80px;
  }
  .nav-bar {
    padding-top: 40px;
  }
  .detail-flex {
    display: flex;
    margin-top: 46px;
    .imgs-box {
      .cur-img {
        width: 500px;
        height: 500px;
        border-radius: 6px;
        cursor: pointer;
        position: relative;
        overflow: hidden;
      }
      .img-list {
        width: 500px;
        overflow: hidden;
        display: flex;
        margin-top: 15px;
        cursor: pointer;
        .img {
          width: 100px;
          height: 100px;
          border-radius: 4px;
          margin-right: 8px;
          flex-shrink: 0;
          position: relative;
          &.active {
            border: 2px solid #e41109;
          }
        }
      }
    }
    .info-box {
      width: 640px;
      margin-left: 40px;
      .info-title {
        min-height: 30px;
        font-size: 30px;
        font-weight: 500;
        color: #121212;
        line-height: 30px;
        margin-top: 6px;
      }
      .desc {
        height: 14px;
        font-size: 14px;
        font-weight: 400;
        color: #9399a3;
        line-height: 14px;
        margin: 16px 0 33px;
      }
      .price-box {
        .label {
          color: rgba(119, 126, 144, 1);
          font-size: 16px;
          line-height: 32px;
          margin-right: 26px;
        }
      }
    }
  }
  .detail-tab {
    width: 1180px;
    border-bottom: 1px solid #eeeeee;
    display: flex;
    font-size: 18px;
    font-weight: 600;
    color: #9399a3;
    justify-content: center;
    margin-top: 100px;
    cursor: pointer;
    .tab {
      width: 170px;
      position: relative;
      text-align: center;
      line-height: 60px;
      color: #9399a3;
      &.active {
        color: #121212;
        &::after {
          content: '';
          display: flex;
          position: absolute;
          left: 50px;
          bottom: 0;
          height: 3px;
          width: 72px;
          background: #020202;
          border-radius: 2px;
        }
      }
    }
    > a {
      text-decoration: none;
      background-color: transparent;
      outline: none;
      cursor: pointer;
      transition: color 0.3s;
    }
  }
  .detail-image {
    width: 790px;
    margin: 36px auto 0;
    font-weight: 600;
    .title {
      font-size: 20px;
      padding: 20px 0;
      background-image: url('https://q01.yinge.cc/resource/2023/03/24/f749d83f-50f2-4fc1-9bb3-0c79340a24ad.png');
      background-size: 100% auto;
      background-position: 0 75%;
      background-repeat: no-repeat;
    }
  }
}
</style>
